package StudyCode.summary.Basic.myint;

import java.util.Scanner;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class TrapezoidArea {
	public static void main(String[] args) {
		double upperBottom = 0;
		double lowerBottom = 0;
		double height = 0;

		Scanner scanner = new Scanner(System.in);
		System.out.println("请输入梯形上底并回车:");
		upperBottom = scanner.nextDouble();
		System.out.println("请输入梯形下底并回车:");
		lowerBottom = scanner.nextDouble();
		System.out.println("请输入梯形高并回车:");
		height = scanner.nextDouble();
		double area = (upperBottom + lowerBottom) * height / 2;
		System.out.println("梯形面积是:" + area);
	}
}
